﻿@{ Layout = "../Shared/_Layout.cshtml"; } <div class="card-box widget-icon">
  <div>
    <img :src="getIconUrl(pluginInfo.iconUrl || package.iconUrl)" style="height: 100px; width: 100px;" class="img-responsive float-left">
    <div class="wid-icon-info" style="margin-left: 120px;">
      <p class="text-muted m-b-5 font-13"> {{ pluginInfo.pluginId || package.id }}.{{ releaseInfo.version ||
        package.version }} </p>
      <h4 class="m-t-0 m-b-5 counter">{{ pluginInfo.title || package.title }}</h4>
      <hr />
      <div class="mt-2 mb-2">
        <span class="text-dark"> 价格： <span v-if="pluginInfo.price" class="text-primary">{{ pluginInfo.price.toFixed(2)
            }}</span>
          <span v-else class="text-primary">免 费</span>
        </span>
        <span v-if="pluginInfo.latestNightlyVersion">
          <span class="ml-2 mr-2 text-dark">|</span>
          <span class="text-dark"> 最新版本: <span class="text-primary"> {{ pluginInfo.latestNightlyVersion }} </span>
          </span>
          <span class="ml-2 mr-2 text-dark">|</span>
          <span class="text-dark"> 更新时间： <span class="text-primary">{{ pluginInfo.latestNightlyPublished }}</span>
          </span>
        </span>
        <span v-if="pluginInfo.tags">
          <span class="ml-2 mr-2 text-dark">|</span>
          <span class="text-dark"> 标签： <a v-for="tagName in getTagNames(pluginInfo)" class="mr-2 text-primary" :href="'add.cshtml?q=' + encodeURIComponent(tagName)">{{
              tagName }}</a>
          </span>
        </span>
      </div>
      <p class="mt-2 mb-2"> {{ pluginInfo.summary || package.summary }} </p>
      <span v-if="installed && isShouldUpdate" class="text-warning mt-2 mb-0"> 系统检测到插件新版本，当前版本：{{ installedVersion
        }}，新版本：{{ releaseInfo.version }} </span>
      <div class="mt-2 mb-2">
        <a v-if="installed && isShouldUpdate" href="javascript:;" v-on:click="location.href='install.cshtml?isUpdate=true&pluginIds=' + pluginInfo.pluginId;return false;"
          class="btn btn-warning">升级插件</a>
        <a v-else-if="installed" href="javascript:;" class="btn disabled ml-2">插件已安装</a>
        <template v-else>
          <a v-if="pluginInfo.price" href="javascript:;" v-on:click="location.href='install.cshtml?pluginIds=' + pluginInfo.pluginId;return false;"
            class="btn btn-primary">购买并安装插件</a>
          <a v-else href="javascript:;" v-on:click="location.href='install.cshtml?pluginIds=' + pluginInfo.pluginId;return false;"
            class="btn btn-primary">安装插件</a>
        </template>
        <a class="btn btn-success ml-2" target="_blank" :href="'https://www.siteserver.cn/plugins/plugin.html?id=' + pluginInfo.pluginId">插件主页</a>
        <button class="btn ml-2" v-on:click="btnReturn()">返 回</button>
      </div>
    </div>
  </div>
</div>
<!-- <div class="card-box">
  <div v-html="package.readme" class="readme m-b-10"></div>
</div> -->
<div class="card-box">
  <div class="page-title-box">
    <h4 class="page-title">插件详情</h4>
  </div>
  <table class="table m-0 m-t-25">
    <tbody>
      <tr>
        <th scope="row">版本发行说明</th>
        <td>{{ releaseInfo.releaseNotes || package.releaseNotes }}</td>
      </tr>
      <tr>
        <th scope="row">更新日期</th>
        <td>{{ releaseInfo.published || package.published }}</td>
      </tr>
      <tr>
        <th scope="row">插件Id</th>
        <td>{{ pluginInfo.pluginId || package.id }}</td>
      </tr>
      <tr>
        <th scope="row">版本号</th>
        <td>{{ releaseInfo.version || package.version }}</td>
      </tr>
      <tr v-if="userInfo">
        <th scope="row">作者</th>
        <td>{{ userInfo.displayName || userInfo.userName }}</td>
      </tr>
      <tr v-if="pluginInfo">
        <th scope="row">标签</th>
        <td>{{ pluginInfo.tags }}</td>
      </tr>
      <tr v-if="pluginInfo">
        <th scope="row">插件项目链接</th>
        <td>
          <a :style="{ display: pluginInfo.projectUrl ? '' : 'none' }" target="_blank" :href="pluginInfo.projectUrl">
            {{ pluginInfo.projectUrl }} </a>
        </td>
      </tr>
      <tr v-if="pluginInfo">
        <th scope="row">版权</th>
        <td>{{ pluginInfo.copyright }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div class="card-box" v-if="(releaseInfo.pluginReferences && releaseInfo.pluginReferences.length > 0) || (releaseInfo.libraryReferences && releaseInfo.libraryReferences.length > 0)">
  <div class="page-title-box">
    <h4 class="page-title"> 依赖项 </h4>
  </div>
  <p class="text-muted font-13 m-b-25"> 此插件依赖的类库以及其他插件 </p>
  <table class="table m-0">
    <thead>
      <tr>
        <th>依赖项</th>
        <th>版本</th>
        <th>类型</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="reference in releaseInfo.pluginReferences">
        <td>{{ reference.id }}</td>
        <td>{{ reference.version }}</td>
        <td>插件</td>
      </tr>
      <tr v-for="reference in releaseInfo.libraryReferences">
        <td>{{ reference.id }}</td>
        <td>{{ reference.version }}</td>
        <td>类库</td>
      </tr>
    </tbody>
  </table>
</div> @section Scripts{ <script src="../assets/js/compareversion.js"></script>
<script src="view.js" type="text/javascript"></script> }